using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using TMS.Domain.Entity;
using TMS.Infrastructrue.Persistence.Configuration.Base;

namespace TMS.Infrastructrue.Persistence.Configuration
{
     public class TeacherConfiguration : BaseEntityConfiguration<Teachers>
    {
        public override void Configure(EntityTypeBuilder<Teachers> builder)
        { 
            
            base.Configure(builder);

            builder.ToTable("teachers");

            builder.Property(x=>x.TeacherId).HasColumnName("teacher_id").HasMaxLength(20000).HasColumnOrder(1);

            builder.Property(x=>x.TeacherName).HasColumnName("teacher_name").HasMaxLength(20000).HasColumnOrder(2);

            builder.Property(x=>x.PhoneNumber).HasColumnName("phone_number").HasMaxLength(20000).HasColumnOrder(3);
            
            builder.Property(x=>x.ChattingNumber).HasColumnName("chat_number").HasMaxLength(20000).HasColumnOrder(4);
        }
    }
}